const objArr = [{
    name:'fhj',
    pass:true
},{
    name:'xc',
    pass:true
}]

const str = JSON.stringify(objArr);
// console.log(JSON.parse(str)[0]);
localStorage.setItem("student",str);  